  <script type='text/javascript'>
  
function translr(serial,a,b){
	//alert(a);alert(b);
    $.ajax({
 url : '<?php echo Yii::app()->request->baseUrl; ?>/backend/admin/translr',
 type : "POST",
 data : {serialno: serial, lr_account:a,amount:b},
		
        success:function(resp)
        {
           
        	alert(resp);
        },
 error:function (xhr, ajaxOptions, thrownError){
     alert(xhr.status);
     alert(thrownError);
 } 
    });	
}

  </script>
  
    <table width="98%" border="1" cellpadding="4" cellspacing="4">
        <tr style="background-color: #ccc">
            <th>STT</th>
            <th>User yêu cầu chuyển</th>
            <th>Account LR của user</th>
            <th>Ngày yêu cầu rút tiền</th>
            <th>Số tiền</th>
            <th>Loại tiền</th>
            <th>Thuc hien viec chuyen tien</th>
        </tr>
       <?php 
      // var_dump($model->withdraw_history[0]);
       $cnt = 0;
       foreach ($withdraws as $withdraw)
            {
           $cnt++;
           //print_r($withdraw);
           //echo 'aaa'.$withdraw->status;
        ?>        
        <tr style="background-color: #F8F8F8">
            <td><?php echo $cnt; ?></td>
            <td><?php echo $withdraw->user_name ?></td>
            <td><?php echo $withdraw->lr_account ?></td>
            <td><?php echo $withdraw->request_withdraw_date; ?></td>
            <td><?php echo $withdraw->money; ?></td>
            <td><?php echo $withdraw->currency; ?></td>
			<td>
			<?php
			if ($withdraw->status==0) {
				echo'
			<button onclick=translr('.$withdraw->serialno.',"'.$withdraw->lr_account.'",'.$withdraw->money.')>Chuyển tiền qua LR</button>
			';
			}
			else
				echo 'shit';
			?>
			</td>
            
           
        </tr>
        <?php } ?>
    </table>